package com.iris.live.services.data.repositories;

import com.iris.live.services.models.PageData;
import com.iris.live.services.models.RequestBase;

import java.sql.Date;
import java.sql.Timestamp;
import java.util.List;

/**
 * Created by lusong on 2016/12/23.
 */
public interface CRMRepository {

    PageData findSurveyInfo(String permit, String username, Date firstToShopDate, Date NPSDate, String stage, String cusName,
                            String cusPhone, String researchState, String connectStartDate, String connectEndDate, String nowState,
                            String intentCarVehicles, String intentCarStyle, String nextConnectStartDate, String nextConnectEndDate,
                            String surveyResult, int pageSize, int pageIndex);

    List findAnswerByTopicId(String topicId, String historyId);

    PageData findNowAndOtherAboutSurvey(String permit, String username, RequestBase requestBase);

    PageData findNowAboutSurveyInTenMinutes(String permit, String username, Timestamp nextConnectTimeStart, Timestamp nextConnectTimeEnd, RequestBase requestBase);

    List findVersionForDealerAboutHistory(String permit, String connectDateStart, String connectDateEnd);

    List findVersionForGroupAboutHistory(String permit, String version, String connectDateStart, String connectDateEnd);

    List findSurveyResult(String permit, String version, String connectDateStart, String connectDateEnd);

    List findVersionForGroupAboutHistory(String[] areas, String connectDateStart, String connectDateEnd);

    List findSurveyResultForGroup(String[] areas, String version, String connectDateStart, String connectDateEnd);

    PageData findLiVEClue(String permit, String createDateStart, String createDateEnd, String lastFollowDateStart,
                          String lastFollowDateEnd, String state, String intentCarLevel, String intentCarStyle, int pageSize, int pageIndex);

    List queryRateAboutSurveyTopicOfAll(String permit, String stage, String startDate, String endDate, String groupVersion, String dealerVersion);

    List queryRateAboutSurveyTopicOfSC(String permit, String stage, String startDate, String endDate, String groupVersion, String dealerVersion);

    List queryVersionAboutSurveyTopicForGroup(String permit, String stage, String startDate, String endDate);

    List queryVersionAboutSurveyTopicForDealer(String permit, String stage, String startDate, String endDate, String groupVersion);
    
    List queryCrmHistoryLogInfo (String historyId);


    List findSurveyInfoForFirstSurvey(String permit, String username, String firstToShopDate, String NPSDate, String stage, String cusName,
                                      String cusPhone, String researchState, String connectStartDate, String connectEndDate, String nowState,
                                      String intentCarVehicles, String intentCarStyle, String nextConnectStartDate, String nextConnectEndDate,
                                      String surveyResult, int pageSize, int pageIndex);


    List findSurveyInfoForNPSSurvey(String permit, String username, String firstToShopDate, String NPSDate, String stage, String cusName,
                                    String cusPhone, String researchState, String connectStartDate, String connectEndDate, String nowState,
                                    String intentCarVehicles, String intentCarStyle, String nextConnectStartDate, String nextConnectEndDate,
                                    String surveyResult, int pageSize, int pageIndex);


    List findSurveyInfoForFailOrSleepSurvey(String permit, String username, String firstToShopDate, String NPSDate, String stage, String cusName,
                                            String cusPhone, String researchState, String connectStartDate, String connectEndDate, String nowState,
                                            String intentCarVehicles, String intentCarStyle, String nextConnectStartDate, String nextConnectEndDate,
                                            String surveyResult, int pageSize, int pageIndex);


    List findSurveyInfoForAlreadySurvey(String permit, String username, String firstToShopDate, String NPSDate, String stage, String cusName,
                                        String cusPhone, String researchState, String connectStartDate, String connectEndDate, String nowState,
                                        String intentCarVehicles, String intentCarStyle, String nextConnectStartDate, String nextConnectEndDate,
                                        String surveyResult, int pageSize, int pageIndex);

    List findSurveyInfoForCount(String permit, String username, String firstToShopDate, String NPSDate, String stage, String cusName,
                                String cusPhone, String researchState, String connectStartDate, String connectEndDate, String nowState,
                                String intentCarVehicles, String intentCarStyle, String nextConnectStartDate, String nextConnectEndDate,
                                String surveyResult, int pageSize, int pageIndex);

}
